unit listboxhelper;

{$mode objfpc}{$H+}

interface

uses
  Classes, SysUtils, StdCtrls;

function ListboxSelectionNotEmpty(L: TListBox): Boolean;

implementation

function ListboxSelectionNotEmpty(L: TListBox): Boolean;
var
  I: Integer;
begin
  ListboxSelectionNotEmpty := False;

  for I := 0 to L.Count -1 do begin
    if L.Selected[I] then begin
      ListboxSelectionNotEmpty := True;
      Exit;
    end;
  end;
end;

end.

